import { createRouter, createWebHashHistory } from 'vue-router';
import Layout from '../layout/index.vue'
const router = createRouter({
  //  hash 模式。
  history: createWebHashHistory(),
  routes: [
    // 设置首页
    // {
    //   path: '/',
    //   component: Layout,
    //   redirect: 'index',
    //   children: [
    //     {
    //       path: 'index',
    //       component: () => import('@/view/first/index.vue'),
    //       name: 'Index',
    //       meta: { title: '首页', icon: 'dashboard', affix: true }
    //     }
    //   ]
    // },
    {
      path: '/',
      redirect: 'index',
      component: () => import('@/view/first/index.vue')
    },
    {
      path: '/index',
      name: 'Index',
      component: () => import('@/view/first/index.vue')
    },
  ],
})

export default router

